/*********************************************************
          File Name:c.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Fri 11 Sep 2015 03:48:25 PM CST
**********************************************************/

#include <iostream>
#include <string>
#include <vector>
#include <cctype>
#include <cstring>
using namespace std;

int main()
{
        string s("abby");

        for(auto &c : s)
        {
                cout << c << endl;
                c = toupper(c);
        }

        decltype(s.size()) size = s.size();
        cout << size << endl;
        unsigned long max = 0;

        if(size - size - 1 >= max - 1)
                cout << "size type is `unsigned long`" << endl;


        vector<string> v, vt(size, "abby");

        for(auto i=s.begin(); i != s.end(); ++i)
                v.push_back(s);

        auto tmp = s.begin();
        cout << *tmp << endl;   // derefence

        for(auto tmp : v)
                cout << tmp << endl;

        for(string tmp: vt)
                cout << tmp << endl;

        char a[] = {'t', 'h', 'i', 's', '\0'};

        for(char c: a)
                cout << c << endl;
        cout << strlen(a) << endl;
}
